@extends('layouts.default')
@section('content') 
<div class="box">
    <header>
        <div class="icons">
            <i class="fa fa-table"></i>
        </div>
        <h5>{{ Lang::get('messages.repair_parts') }}</h5>
        <div class="toolbar">  
            {{ Helpers\Helper::fa_link_to_action('glyphicon glyphicon-plus',
                            'RepairController@create_repairPart',
                            Lang::get('messages.add_btn'),null,array(
                            'class'=>'btn btn-success btn-xs btn-round'))
            }}  
        </div>
    </header><br/>
    <table id="dataTable"  style="width:100%" class="table table-bordered table-condensed table-hover table-striped">
        <thead style="width:100%">
            <tr>
                <th>{{Lang::get('messages.repair')}}</th>
                <th>{{Lang::get('messages.user')}}</th>
                <th>{{Lang::get('messages.action')}}</th>
            </tr>
        </thead>
        <tbody  style="width:100%">                          
            @foreach ($all_repairs as $a)
            <tr> 
                <td>{{ Lang::get('repair.'.$a->repair) }}</td>    
                <td>{{ Lang::get($a->Username) }}</td>  
                <td>{{ Helpers\Helper::fa_link_to_action('glyphicon glyphicon-check',
                                        'RepairController@edit_repairParts',Lang::get('messages.edit_btn'),array('id'=>$a->id),array(
                                        'class'=>'btn btn-success btn-xs btn-round'))
                    }} 
                    {{ Helpers\Helper::fa_link_to_action('glyphicon glyphicon-trash',
                                        'RepairController@destroy_repairPart',Lang::get('messages.delete_btn'),array('id'=>$a->id),array(
                                        'class'=>'btn btn-danger btn-xs btn-round delete',
                                 'data-confirm'=>Lang::get('messages.confirm_delete')))
                    }}
                </td>                                
                @endforeach
        </tbody>
    </table>
    <a type="button" class="btn btn-danger btn-line" href='{{URL::to('repair_parts')}}'>{{Lang::get('messages.back_btn')}}</a>
    {{  Helpers\Helper::modal(Lang::get('messages.modal_confirm'),Lang::get("messages.close_btn"),Lang::get("messages.ok_btn"),'dataConfirmOK')}}
</div>
@stop
